<template>
  <el-row>
    <template v-if="renderItem.type === 'button'">
      <el-button
        :type="renderItem && renderItem.options.type"
        :size="renderItem && renderItem.options.size"
        icon="i-edit"
      >
        {{ renderItem.options.text }}
      </el-button>
    </template>
    <template v-if="renderItem.type === 'input'">
      <el-input>11</el-input>
    </template>
  </el-row>
</template>
<script>
import { defineComponent, computed } from "vue";
export default defineComponent({
  props: {
    element: {
      type: Object,
    },
  },
  setup(props) {
    const renderItem = computed(() => {
      return props.element;
    });
    return { renderItem };
  },
});
</script>
<style lang="scss" scoped>
.el-form-item {
  &:hover {
    border: 1px solid red;
  }
}
</style>
